@(placeForm: Form[Place], msg: String)
@helper.form(action = routes.Places.addPlace, 'class -> "pull-left") {
    <input name="id" type="hidden" value="@placeForm("id").value" />
    @helper.inputText(placeForm("name"))
    @helper.textarea(placeForm("description"))
    @helper.inputText(placeForm("address"))
    @helper.inputText(placeForm("latitude"))
    @helper.inputText(placeForm("longitude"))
    
        <button id="submit-place" class="btn btn-primary">@if(placeForm("id").value == null || placeForm("id").value.isEmpty){Create}else{Edit}</button>
    @if(!msg.isEmpty()){
        @Html(msg)
    }
}
<div id="place-gmap" class="pull-left center">
    <div id="place-gmap-container">
    </div>
    <input id="place-search-address" type="text" />
    <input id="place-search" class="btn" type="button" value="Search" />
</div>
<script type="text/javascript">
    $(document).ready(function(){
        if(typeof(google) === 'undefined'){
            $.getScript('https://maps.googleapis.com/maps/api/js?sensor=false&callback=createPlaceGmap');
        } else {
            createPlaceGmap();
        }
    });
    function createPlaceGmap(){
        app.geocoder = new google.maps.Geocoder();
        createDefaultGmap($('#place-gmap-container')[0], @if(placeForm("latitude").value == null){undefined}else{@placeForm("latitude").value}, @if(placeForm("longitude").value == null){undefined}else{@placeForm("longitude").value});
    }
</script>